from django.urls import path
from .views import (
    AdSpaceListView, AdSpaceAdminListView, AdSpaceDetailView,
    AdvertisementListView, AdvertisementAdminListView,
    AdvertisementAdminDetailView, AdvertisementCreateView,
    track_impression, track_click, ad_performance_report,
    campaign_performance, ad_daily_report, AdCampaignListView,
    AdCampaignDetailView, AdCampaignCreateView, AdPricingListView,
    AdPricingDetailView
)

urlpatterns = [
    path('ad-spaces/', AdSpaceListView.as_view(), name='ad-space-list'),
    path('admin/ad-spaces/', AdSpaceAdminListView.as_view(), name='ad-space-admin-list'),
    path('admin/ad-spaces/<int:pk>/', AdSpaceDetailView.as_view(), name='ad-space-detail'),
    
    path('advertisements/', AdvertisementListView.as_view(), name='advertisement-list'),
    path('admin/advertisements/', AdvertisementAdminListView.as_view(), name='advertisement-admin-list'),
    path('admin/advertisements/<int:pk>/', AdvertisementAdminDetailView.as_view(), name='advertisement-admin-detail'),
    path('advertisements/create/', AdvertisementCreateView.as_view(), name='advertisement-create'),
    
    path('advertisements/<int:ad_id>/impression/', track_impression, name='track-impression'),
    path('advertisements/<int:ad_id>/click/', track_click, name='track-click'),
    
    path('reports/performance/', ad_performance_report, name='ad-performance-report'),
    path('reports/campaign-performance/', campaign_performance, name='campaign-performance'),
    path('reports/daily/', ad_daily_report, name='ad-daily-report'),
    
    path('campaigns/', AdCampaignListView.as_view(), name='ad-campaign-list'),
    path('campaigns/create/', AdCampaignCreateView.as_view(), name='ad-campaign-create'),
    path('campaigns/<int:pk>/', AdCampaignDetailView.as_view(), name='ad-campaign-detail'),
    
    path('pricing/', AdPricingListView.as_view(), name='ad-pricing-list'),
    path('pricing/<int:pk>/', AdPricingDetailView.as_view(), name='ad-pricing-detail'),
]
